﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="VerifyRepairQualityManagement.aspx.cs" Inherits="WebApp.RepairingTickets.VerifyRepairQualityManagement" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="scriptCssContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="titlePlaceHolder" runat="server">
    <asp:literal id="pageTitle" runat="server"></asp:literal>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="menuPlaceHolder" runat="server">
    <one:TabStrip ID="tspTicketManagement" runat="server" selectedtabcssclass="Current">
        <one:Tab name="receivingTicket" NavigateUrl="~/ReceivingTicket/ReceivingTicketEdit.aspx" Text="<%$ Resources:Strings, ReceivingTicket%>"></one:Tab>
        <one:Tab Name="repairingTicket" NavigateUrl="~/RepairingTickets/RepairingTicketManagement.aspx" Text="<%$ Resources:Strings, RepairingTicket%>"></one:Tab>
        <one:Tab Name="checkWarranty" NavigateUrl="~/RepairingTickets/CheckWarrantyManagement.aspx" Text="<%$ Resources:Strings, CheckWarranty%>" AllowRoles="Administrators,WarrantyConfirmers"></one:Tab>
        <one:Tab Name="verifyRepairQuality" NavigateUrl="~/RepairingTickets/VerifyRepairQualityManagement.aspx" Text="<%$ Resources:Strings, VerifyRepairQuality%>" AllowRoles="Administrators,RepairQualityConfirmers"></one:Tab>
        <one:Tab Name="searchRepairInfomation" NavigateUrl="~/ReceivingTicket/ReceivingTicketManagement.aspx" Text="<%$ Resources:Strings, SearchRepairInfomation%>"></one:Tab>
    </one:TabStrip>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="contentPlaceHolder" runat="server">
    <fieldset title="Thông tin tìm kiếm">
        <legend>Thông tin tìm kiếm</legend>

        <fieldset title="Thông tin khách hàng">
            <legend>Thông tin khách hàng</legend>
            <table style="width:100%; border:0px;">
                <tr>
                    <td class="ISoft_LabelTitle" style="width:15%;">Họ tên</td>
                    <td class="ISoft_Input" style="width:35%;">
                        <telerik:RadTextBox ID="txtFullName" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="200" Width="100%"></telerik:RadTextBox>
                    </td>

                    <td class="ISoft_LabelTitle" style="width:15%;">Số điện thoại</td>
                    <td class="ISoft_Input" style="width:35%;">
                        <telerik:RadTextBox ID="txtMobile" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="50" Width="100%"></telerik:RadTextBox>
                    </td>
                </tr>

                <tr>
                    <td class="ISoft_LabelTitle">Địa chỉ</td>
                    <td class="ISoft_Input" colspan="3">
                        <telerik:RadTextBox ID="txtAddress" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="300" Width="100%"></telerik:RadTextBox>
                    </td>
                </tr>
            </table>
        </fieldset>

        <fieldset title="Thông tin sản phẩm">
            <legend>Thông tin sản phẩm</legend>
            <table style="width:100%; border:0px;">
                <tr>
                    <td class="ISoft_LabelTitle" style="width:15%;">Loại sản phẩm</td>
                    <td class="ISoft_Input" style="width:35%;">
                        <telerik:RadComboBox
                            ID="rcbProductType" Runat="server" Skin="<%$ Resources:Strings, Skin%>" 
                            MarkFirstMatch="True" Width="100%" Height="150px" 
                            AllowCustomText="True" EmptyMessage="Chọn loại sản phẩm">
                            <ExpandAnimation Type="None" />
                            <CollapseAnimation Type="None" />
                        </telerik:RadComboBox>
                    </td>

                    <td class="ISoft_LabelTitle" style="width:15%;">Hãng sản xuất</td>
                    <td class="ISoft_Input" style="width:35%;">
                        <telerik:RadComboBox
                            ID="rcbManufacturer" Runat="server" Skin="<%$ Resources:Strings, Skin%>" 
                            MarkFirstMatch="True" Width="100%" Height="150px"
                            AllowCustomText="True" EmptyMessage="Chọn hãng sản xuất">
                            <ExpandAnimation Type="None" />
                            <CollapseAnimation Type="None" />
                        </telerik:RadComboBox>
                    </td>
                </tr>

                <tr>
                    <td class="ISoft_LabelTitle">Số model</td>
                    <td class="ISoft_Input">
                        <telerik:RadTextBox ID="txtModel" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="100" Width="100%"></telerik:RadTextBox>
                    </td>

                    <td class="ISoft_LabelTitle">Số serial</td>
                    <td class="ISoft_Input">
                        <telerik:RadTextBox ID="txtSerialNumber" Runat="server" Skin="<%$ Resources:Strings, Skin%>" MaxLength="100" Width="100%"></telerik:RadTextBox>
                    </td>
                </tr>

            </table>
        </fieldset>

        <fieldset title="Thông tin tiếp nhận & sửa chữa">
            <legend>Thông tin tiếp nhận & sửa chữa</legend>
            <table style="width:100%; border:0px;">
                <tr>
                    <td class="ISoft_LabelTitle" style="width:15%;">Ngày nhận từ</td>
                    <td class="ISoft_Input" style="width:35%;">
                        <telerik:RadDatePicker ID="rdpCreatedDateFrom" Runat="server" Skin="<%$ Resources:Strings, Skin%>" 
                                                Culture="Vietnamese (Vietnam)" Width="150px">
                            <Calendar ID="Calendar2" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" 
                                        ViewSelectorText="x" Skin="<%$ Resources:Strings, Skin%>" >
                            </Calendar>

                            <DatePopupButton ImageUrl="" HoverImageUrl="" ToolTip="Bấm vào đây để chọn ngày."></DatePopupButton>
                            <DateInput ID="DateInput2" runat="server" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy" EmptyMessage="Chọn ngày tiếp nhận">
                                <ClientEvents OnError="DateError" />
                            </DateInput>
                            <ClientEvents OnDateSelected="DateSelected" />
                        </telerik:RadDatePicker>
                    </td>

                    <td class="ISoft_LabelTitle" style="width:15%;">đến</td>
                    <td class="ISoft_Input" style="width:35%;">
                        <telerik:RadDatePicker ID="rdpCreatedDateTo" Runat="server" Skin="<%$ Resources:Strings, Skin%>" 
                                                Culture="Vietnamese (Vietnam)" Width="150px">
                            <Calendar ID="Calendar1" runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" 
                                        ViewSelectorText="x" Skin="<%$ Resources:Strings, Skin%>" >
                            </Calendar>

                            <DatePopupButton ImageUrl="" HoverImageUrl="" ToolTip="Bấm vào đây để chọn ngày."></DatePopupButton>
                            <DateInput ID="DateInput1" runat="server" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy" EmptyMessage="Chọn ngày tiếp nhận">
                                <ClientEvents OnError="DateError" />
                            </DateInput>
                            <ClientEvents OnDateSelected="DateSelected" />
                        </telerik:RadDatePicker>
                    </td>
                </tr>

                <tr>
                    <td class="ISoft_LabelTitle">Loại sửa chữa</td>
                    <td class="ISoft_Input">
                        <telerik:RadComboBox 
                            ID="rcbRepairingType" Runat="server" Skin="<%$ Resources:Strings, Skin%>"
                            MarkFirstMatch="True" Width="100%" Height="150px" 
                            AllowCustomText="True" EmptyMessage="Chọn loại sửa chữa">
                            <ExpandAnimation Type="None" />
                            <CollapseAnimation Type="None" />
                        </telerik:RadComboBox>
                    
                    </td>
                    <td class="ISoft_LabelTitle">Tình trạng</td>
                    <td class="ISoft_Input">
                        <telerik:RadComboBox 
                            ID="rcbStatus" Runat="server" Skin="<%$ Resources:Strings, Skin%>"
                            MarkFirstMatch="True" Width="100%" Height="150px" 
                            AllowCustomText="True" EmptyMessage="Chọn tình trạng" Enabled="false">
                            <ExpandAnimation Type="None" />
                            <CollapseAnimation Type="None" />
                        </telerik:RadComboBox>
                    </td>
                </tr>

                <tr>
                    <td class="ISoft_LabelTitle">Tình trạng ghi nhận chất lượng sửa</td>
                    <td class="ISoft_Input">
                        <telerik:RadComboBox 
                            ID="rcbRepairQualityStatus" Runat="server" Skin="<%$ Resources:Strings, Skin%>"
                            MarkFirstMatch="True" Width="100%" Height="150px" 
                            AllowCustomText="True" EmptyMessage="Chọn tình trạng ghi nhận chất lượng sửa">
                            <ExpandAnimation Type="None" />
                            <CollapseAnimation Type="None" />
                            <Items>
                                <telerik:RadComboBoxItem Value="" Text="" />
                                <telerik:RadComboBoxItem Value="0" Text="Chưa ghi nhận" />
                                <telerik:RadComboBoxItem Value="1" Text="Đã ghi nhận" />
                            </Items>
                        </telerik:RadComboBox>
                    </td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
            </table>
        </fieldset>
    </fieldset>

    <table style="width:100%; border:0px;">
        <tr>
            <td class="ISoft_ButtonsRow">
                <telerik:RadButton ID="btnSearch" runat="server" 
                    Skin="<%$ Resources:Strings, Skin%>" Text="<%$ Resources:Strings, Search%>" 
                    Width="100px" onclick="btnSearch_Click"></telerik:RadButton>
            </td>
        </tr>

        <tr>
            <td>
                <telerik:RadGrid ID="grdResult" runat="server" AllowPaging="true" AllowSorting="true"
                                EnableEmbeddedSkins="true" 
                    Skin="<%$ Resources:Strings, Skin%>" onitemcommand="grdResult_ItemCommand" 
                    onitemcreated="grdResult_ItemCreated" 
                    onneeddatasource="grdResult_NeedDataSource" 
                    onitemdatabound="grdResult_ItemDataBound" 
                    onpageindexchanged="grdResult_PageIndexChanged" 
                    onpagesizechanged="grdResult_PageSizeChanged">
                    <HeaderStyle Wrap="true" Font-Bold="true" HorizontalAlign="Center" Font-Size="10pt" />
                    <AlternatingItemStyle Font-Names="arial,tahoma,sans-serif" Font-Size="12px" BorderStyle="Solid"/>                
                    <ItemStyle Font-Names="arial,tahoma,sans-serif" Font-Size="12px" BorderColor="#2299DD"/>
                    
                    <PagerStyle  HorizontalAlign="Right" Mode="NextPrevNumericAndAdvanced"
                                PagerTextFormat="Chọn trang: {4} &amp;nbsp;|&amp;nbsp; Trang hiện tại: {0} / {1}, mẫu tin: {2} - {3} / {5}." AlwaysVisible="True"/>
                    
                    <MasterTableView AutoGenerateColumns="false" NoMasterRecordsText="<%$ Resources:Strings, NoMasterRecordsText%>">
            
                        <Columns>
                            <telerik:GridTemplateColumn HeaderText="STT">
                                <HeaderStyle Width="30px" />
                                <ItemStyle HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:Label style="text-align:center" id="lblSTT" runat="server" Text='<%# grdResult.CurrentPageIndex*grdResult.PageSize + grdResult.Items.Count+1 %>' />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                
                            <telerik:GridBoundColumn DataField="RepairingTicketHistoryID" UniqueName="RepairingTicketHistoryID" Visible="false">
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="AllowEdit" UniqueName="AllowEdit" Visible="false">
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn DataField="DisplayColor" UniqueName="DisplayColor" Visible="false">
                            </telerik:GridBoundColumn>
            
                            <telerik:GridBoundColumn HeaderText="Tên KH" DataField="FullName" UniqueName="FullName" SortExpression="FullName">
                                <ItemStyle HorizontalAlign="Left" Width="10%"/>
                            </telerik:GridBoundColumn>
                
                            <telerik:GridBoundColumn HeaderText="SĐT" DataField="Mobile" UniqueName="Mobile" SortExpression="Mobile">
                                <ItemStyle HorizontalAlign="Left" Width="10%"/>
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn HeaderText="Địa Chỉ" DataField="Address" UniqueName="Address" SortExpression="Address">
                                <ItemStyle HorizontalAlign="Left" Width="15%"/>
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn HeaderText="Loại Sản Phẩm" DataField="ProductTypeName" UniqueName="ProductTypeName" SortExpression="ProductTypeName">
                                <ItemStyle HorizontalAlign="Left" Width="10%"/>
                            </telerik:GridBoundColumn>
                
                            <telerik:GridBoundColumn HeaderText="Model" DataField="Model" UniqueName="Model" SortExpression="Model">
                                <ItemStyle HorizontalAlign="Left" Width="10%"/>
                            </telerik:GridBoundColumn>
                            
                            <telerik:GridBoundColumn HeaderText="Serial" DataField="SerialNumber" UniqueName="SerialNumber" SortExpression="SerialNumber">
                                <ItemStyle HorizontalAlign="Left" Width="10%"/>
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn HeaderText="Ngày Nhận" DataField="CreatedDate" UniqueName="CreatedDate" SortExpression="CreatedDate">
                                <ItemStyle HorizontalAlign="Center" Width="10%"/>
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn HeaderText="Tình Trạng" DataField="StatusName" UniqueName="StatusName" SortExpression="StatusName">
                                <ItemStyle HorizontalAlign="Left" Width="10%"/>
                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn HeaderText="Chất Lượng Sửa" DataField="RepairQualityName" UniqueName="RepairQualityName" SortExpression="RepairQualityName">
                                <ItemStyle HorizontalAlign="Left" Width="10%"/>
                            </telerik:GridBoundColumn>

                            <telerik:GridTemplateColumn HeaderText="Sửa" UniqueName="ColEdit">
                                <ItemTemplate>
                                    <asp:ImageButton runat="server" ID="imbEdit" ImageAlign="Middle" ImageUrl="~/images/Edit.gif" CommandName="cmdEdit"/>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="30px" />
                            </telerik:GridTemplateColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
            </td>
        </tr>
    </table>
</asp:Content>
